home *** CD-ROM | disk | FTP | other *** search
- 5 rem--ahoy--may issue--math master--prog page 65
- 10 rem ****** math master ****** ***** by bob lloret *****
- 15 rem ** for ahoy magazines **
- 20 rem *************************
- 90 lev=0:t=0:prob=0
- 100 print "[147]":poke 53280,6:poke 53281,0
- 110 print "[158]":print tab(11);"[145][176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
- 120 print tab(11);"[194]* math master *[194]"
- 130 print tab(11);"[173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]"
- 140 print:print tab(13);"by: bob lloret":print:print
- 150 print "[158][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168][168]"
- 160 print tab(11);"[145][145][145][145][154]first name:";:input name$
- 161 if name$="" then print "":goto160
- 162 for a=1 to 2:print:next a
- 165 s=54272:for l=0 to 24:poke s+l,0:next
- 166 poke s+1,22:poke s,96:poke s+5,10:poke s+24,10:poke s+4,33
- 170 print tab(11);"[1]..addition":print:print tab(11);"[156][2]..subtraction"
- 180 print:print tab(11);"[3]..multiplication"
- 190 print:print tab(11);"[149][4]..division"
- 200 print:print "[158] [168][168][168][168][168] [168][168][168][168][168] [168][168][168][168][168] [168][168][168][168][168] "
- 205 print
- 210 print tab(11);"your choice [1-4]?"
- 220 get choice$:if choice$="" then 220
- 225 rem [*** player level ***]
- 226 rem ========================
- 230 print "[147]":poke 53280,0:poke 53281,4
- 240 print tab(9);"[158][168][168][168][168] player level [168][168][168][168]":print tab(14);"[168][168][168][168][168][168][168][168][168][168][168][168]"
- 250 for a=1 to 5:print:next a
- 260 print tab(11);"[144][1]..ages 6 to 9":print:print tab(11);"[2]..ages 10 to 14"
- 270 print:print tab(11);"[3]..ages 15 to adult":for a=1 to 6:print:next a
- 280 print tab(12);"your choice [1-3]?"
- 290 get lev$:if lev$="" then 290
- 300 lev=val(lev$):choice=val(choice$)
- 310 if lev=1 then v=10:dig=1:t=15:goto 360
- 320 if lev=2 then v=50:dig=10:t=12:goto 360
- 330 if lev=3 then v=100:dig=25:t=10:goto 360
- 360 on choice goto 500,1000,1500,2000
- 497 rem
- 498 rem [ **** addition **** ]
- 499 rem ========================
- 500 print "[147]":poke 53280,0:poke 53281,5
- 510 print tab(11);"[144]* a d d i t i o n *":print:print tab(17);"level";lev
- 520 prob=prob+1:x=int(rnd(0)*v)+dig:y=int(rnd(0)*v)+dig
- 530 print tab(15);"problem:";prob
- 540 for a=1 to 3:print:next a
- 550 print "[144] [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
- 560 print " [194] [194]"
- 570 print " [194] [194]"
- 580 print " [194] [194]"
- 590 print " [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]"
- 595 for d=1 to 500:next d
- 600 for l=0 to 24:poke s+l,0:next
- 605 poke s+1,33:poke s,135:poke s+5,9:poke s+24,10:poke s+4,33
- 610 print tab(11);"[145][145][145]";x;" + ";y;" = "
- 620 ti$="000000":b=0:z=12
- 630 b=b+1:for a=1 to z:print:next
- 640 get an$(b):print tab(16);"[144][145]time:";"[156]";int(ti/60)
- 645 if int(ti/60)>=t then 850
- 650 if an$(b)="" then 640
- 660 print tab(24+b);"[145][145][145][145][145][145][145][145][145][145][145][145][145]";an$(b):if an$(b)=chr$(13) then 670
- 665 goto 630
- 670 a$=an$(1)+an$(2)+an$(3)
- 675 ans=val(a$):if ans<>x+y then 780
- 680 cent=int(40-len("correct"+name$))/2
- 690 print tab(cent);"[158]correct ";name$;","
- 700 for a=10 to 0 step -1:poke 53280,a:for d=1 to 100:next d:next a:c=c+1
- 710 print tab(13);"you now have ";c
- 720 print tab(13);"correct answers"
- 730 for d=1 to 2400:next d
- 740 if prob=10 then 3000
- 750 goto 500
- 760 rem [ * wrong answer * ]
- 770 rem ====================
- 780 cent=int(40-len("sorry"+name$))/2
- 785 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 787 poke s+5,10:poke s+24,15:poke s+4,33
- 790 print tab(cent);"sorry ";name$;","
- 800 print tab(11);"but the answer is...":print tab(18);"";x+y
- 810 for d=1 to 2400:next d
- 820 if prob=10 then 3000
- 830 goto 500
- 840 rem [ *** time limit *** ]
- 841 rem ======================
- 850 cent=int(40-len("sorry"+name$))/2
- 855 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 857 poke s+5,10:poke s+24,15:poke s+4,33
- 860 print tab(cent);"[145][145][145][145][145][145][145][145][145]sorry";name$;","
- 870 print tab(11);"but the answer is...":print tab(18);"";x+y
- 880 for d=1 to 2400:next d
- 890 if prob=10 then 3000
- 900 goto 500
- 997 rem
- 998 rem [ *** subtraction *** ]
- 999 rem =======================
- 1000 print "[147]":poke 53280,0:poke 53281,8
- 1010 print tab(8);"[144]* s u b t r a c t i o n *":print:print tab(17);"level";lev
- 1020 prob=prob+1:x=int(rnd(0)*v)+dig+v:y=int(rnd(0)*v)+1
- 1030 print tab(15);"problem:";prob
- 1040 for a=1 to 3:print:next a
- 1050 print "[144] [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
- 1060 print " [194] [194]"
- 1070 print " [194] [194]"
- 1080 print " [194] [194]"
- 1090 print " [173][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][189]"
- 1095 for d=1 to 500:next d
- 1100 for l=0 to 24:poke s+l,0:next
- 1105 poke s+1,33:poke s,135:poke s+5,9:poke s+24,10:poke s+4,33
- 1110 print tab(11);"[145][145][145]";x;" - ";y;" = "
- 1120 ti$="000000":b=0:z=12
- 1130 b=b+1:for a=1 to z:print:next
- 1140 get an$(b):print tab(16);"[144][145]time:";"";int(ti/60)
- 1145 if int(ti/60)>=t then 1350
- 1150 if an$(b)="" then 1140
- 1160 print tab(25+b);"[145][145][145][145][145][145][145][145][145][145][145][145][145]";an$(b):if an$(b)=chr$(13) then 1170
- 1165 goto 1130
- 1170 a$=an$(1)+an$(2)+an$(3)
- 1175 ans=val(a$):if ans<>x-y then 1275
- 1180 cent=int(40-len("correct"+name$))/2
- 1190 print tab(cent);"[158]correct ";name$;","
- 1200 for a=10 to 0 step -1:poke 53280,a:for d=1 to 120:next d:next a:c=c+1
- 1210 print tab(13);"you now have ";c
- 1220 print tab(13);"correct answers"
- 1230 for d=1 to 2400:next d
- 1240 if prob=10 then 3000
- 1250 goto 1000
- 1260 rem [ * wrong answer * ]
- 1270 rem ====================
- 1275 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 1277 poke s+5,10:poke s+24,15:poke s+4,33
- 1280 cent=int(40-len("sorry"+name$))/2
- 1290 print tab(cent);"[153]sorry ";name$;","
- 1300 print tab(11);"but the answer is...":print tab(18);"";x-y
- 1310 for d=1 to 2400:next d
- 1320 if prob=10 then 3000
- 1330 goto 1000
- 1340 rem [ *** time limit *** ]
- 1341 rem ======================
- 1350 cent=int(40-len("sorry"+name$))/2
- 1360 print tab(cent);"[145][145][145][145][145][145][145][145][145]sorry ";name$;","
- 1370 print tab(11);"but the answer is...":print tab(18);"";x-y
- 1380 for d=1 to 2400:next d
- 1390 if prob=10 then 3000
- 1400 goto 1000
- 1500 print "[147]":poke 53280,0:poke 53281,6
- 1510 print tab(11);"[144]* m u l t i p l y *":print:print tab(17);"[158]level";lev
- 1520 prob=prob+1:x=int(rnd(0)*v)+dig:y=int(rnd(0)*v)+dig
- 1530 print tab(15);"[158]problem:";prob
- 1540 for a=1 to 3:print:next a
- 1550 print "[144] [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
- 1560 print " [194] [194]"
- 1570 print " [194] [194]"
- 1580 print " [194] [194]"
- 1590 print " [173] [189]"
- 1595 for d=1 to 500:next d
- 1600 for l=0 to 24:poke s+l,0:next
- 1605 poke s+1,33:poke s,135:poke s+5,9:poke s+24,10:poke s+4,33
- 1610 print tab(11);"[145][145][145]";x;" x ";y;" = "
- 1620 ti$="000000":b=0:z=12
- 1630 b=b+1:for a=1 to z:print:next
- 1640 get an$(b):print tab(16);"[144][145]time:";"[156]";int(ti/60)
- 1645 if int(ti/60)>=t then 1850
- 1650 if an$(b)="" then 1640
- 1660 print tab(24+b);"[145][145][145][145][145][145][145][145][145][145][145][145][145]";an$(b):if an$(b)=chr$(13) then 1670
- 1665 goto 1630
- 1670 a$=an$(1)+an$(2)+an$(3)
- 1675 ans=val(a$):if ans<>x*y then 1780
- 1680 cent=int(40-len("correct"+name$))/2
- 1690 print tab(cent);"[158]correct ";name$;","
- 1700 for a=10 to 0 step -1:poke 53280,a:for d=1 to 100:next d:next a:c=c+1
- 1710 print tab(13);"you now have ";c
- 1720 print tab(13);"correct answers"
- 1730 for d=1 to 2400:next d
- 1740 if prob=10 then 3000
- 1750 goto 1500
- 1760 rem [ * wrong answer * ]
- 1770 rem ====================
- 1780 cent=int(40-len("sorry"+name$))/2
- 1785 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 1787 poke s+5,10:poke s+24,15:poke s+4,33
- 1790 print tab(cent);"sorry ";name$;","
- 1800 print tab(11);"but the answer is...":print tab(18);"";x*y
- 1810 for d=1 to 2400:next d
- 1820 if prob=10 then 3000
- 1830 goto 1500
- 1840 rem [ *** time limit *** ]
- 1841 rem ======================
- 1850 cent=int(40-len("sorry"+name$))/2
- 1855 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 1857 poke s+5,10:poke s+24,15:poke s+4,33
- 1860 print tab(cent);"[145][145][145][145][145][145][145][145][145]sorry ";name$;","
- 1870 print tab(11);"but the answer is...":print tab(18);"";x*y
- 1880 for d=1 to 2400:next d
- 1890 if prob=10 then 3000
- 1900 goto 1500
- 2000 print "[147]":poke 53280,6:poke 53281,9
- 2010 print tab(11);"[144]* d i v i s i o n *":print:print tab(17);"[158]level";lev
- 2020 prob=prob+1:w=int(rnd(0)*v)+dig:y=int(rnd(0)*10)+1
- 2030 print tab(15);"[158]problem:";prob
- 2040 for a=1 to 3:print:next a
- 2050 print "[144] [176][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][195][174]"
- 2060 print " [194] [194]"
- 2070 print " [194] [194]"
- 2080 print " [194] [194]"
- 2090 print " [173] [189]"
- 2095 for d=1 to 500:next d
- 2100 for l=0 to 24:poke s+l,0:next
- 2105 poke s+1,33:poke s,135:poke s+5,9:poke s+24,10:poke s+4,33
- 2110 x=int(w*y)
- 2115 print tab(11);"[145][145][145]";x;" / ";y;" = "
- 2120 ti$="000000":b=0:z=12
- 2130 b=b+1:for a=1 to z:print:next
- 2140 get an$(b):print tab(16);"[144][145]time:";"[156]";int(ti/60)
- 2145 if int(ti/60)>=t then 2350
- 2150 if an$(b)="" then 2140
- 2160 print tab(24+b);"[145][145][145][145][145][145][145][145][145][145][145][145][145]";an$(b):if an$(b)=chr$(13) then 2170
- 2165 goto 2130
- 2170 a$=an$(1)+an$(2)+an$(3)
- 2175 ans=val(a$):if ans<>int(x/y) then 2280
- 2180 cent=int(40-len("correct"+name$))/2
- 2190 print tab(cent);"[158]correct ";name$;","
- 2200 for a=10 to 0 step -1:poke 53280,a:for d=1 to 100:next d:next a:c=c+1
- 2210 print tab(13);"you now have ";c
- 2220 print tab(13);"correct answers"
- 2230 for d=1 to 2400:next d
- 2240 if prob=10 then 3000
- 2250 goto 2000
- 2260 rem [ * wrong answer * ]
- 2270 rem ====================
- 2280 cent=int(40-len("sorry"+name$))/2
- 2285 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 2287 poke s+5,10:poke s+24,15:poke s+4,33
- 2290 print tab(cent);"sorry ";name$;","
- 2300 print tab(11);"but the answer is...":print tab(18);"";x/y
- 2310 for d=1 to 2400:next d
- 2320 if prob=10 then 3000
- 2330 goto 2000
- 2340 rem [ *** time limit *** ]
- 2345 rem ======================
- 2350 cent=int(40-len("sorry"+name$))/2
- 2355 for l=0 to 24:poke s+l,0:next:poke s+1,4:poke s,48
- 2357 poke s+5,10:poke s+24,15:poke s+4,33
- 2360 print tab(cent);"[145][145][145][145][145][145][145][145][145]sorry ";name$;","
- 2370 print tab(11);"but the answer is...":print tab(18);"";x/y
- 2380 for d=1 to 2400:next d
- 2390 if prob=10 then 3000
- 2400 goto 2000
- 3000 rem *** final results ***
- 3010 rem =====================
- 3020 print "[147]":poke 53280,2:poke 53281,15
- 3030 print tab(8);"[168][168][168][168][168] r e s u l t s [168][168][168][168][168]"
- 3035 print tab(12);"&[168][168][168][168][168][168][168][168][168][168][168][168][168][168][168]&"
- 3040 print tab(10);"you scored ";c;"out of"
- 3050 print tab(15);"10 correct"
- 3060 p=int(c*100)/10
- 3070 print tab(11);"for a mark of ";p;"%"
- 3080 print " [168][168][168][168][168] [168][168][168][168][168] [168][168][168][168][168] [168][168][168][168][168]"
- 3085 for d=1 to 2000:next d
- 3090 if p<=60 then 3120
- 3100 if p<=90 then 3150
- 3110 if p>90 then 3180
- 3120 cent=int(40-len("come on"+name$))/2
- 3130 print tab(cent);"come on ";name$;",":print tab(12);"i know you can do"
- 3140 print tab(12);"better than that":goto 3220
- 3150 cent=int(40-len("not bad"+name$))/2
- 3160 print tab(cent);"not bad ";name$;","
- 3170 print tab(11);"i think you should":print tab(11);"try a little harder"
- 3175 goto 3220
- 3180 cent=int(40-len("congratulations"+name$))/2:for a=1 to 3:print:next a
- 3185 for a=1 to 7:print tab(cent);"[145]congratulations ";name$;","
- 3190 ford=1 to 200:next d:print tab(cent);"[145]congratulations ";name$;","
- 3195 for d=1 to 200:next d:next a
- 3200 print tab(12);"you got a perfect":print tab(16);"score !!!"
- 3220 print tab(12);"try again [y/n]?";
- 3230 get x$:if x$="" then 3230
- 3240 if x$<>"y" then end
- 3250 goto 90
-